# 导入库
import requests
from bs4 import BeautifulSoup
i = 7109
while True:
    # 写上链接
    url = f'https://www.xbiquge.la/0/10/{str(i)}.html'
    # 设置请求头
    headers = {  # 告诉对方服务器，我们的身份
        'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36'
    }
    # 发送请求
    html = requests.get(url,headers=headers)
    html.encoding = 'UTF-8'
    str_html = html.text
    head1=str_html.find('<h1>')
    head2=str_html.find('</h1>')
    if str_html[head1+7:head2]==' Service Temporarily Unavailable':
        continue
    print(str_html[head1+7:head2])
    i+=1
    if i>8110:
        break
